package com.nc.delivery_project.shared.servicelocator;

import com.google.web.bindery.requestfactory.shared.ServiceLocator;
import com.nc.delivery_project.server.service.ScheduleService;


/**
 * Created by DRAGON on 28.01.2015.
 */
public class ScheduleServiceLocator implements ServiceLocator {
    private static ScheduleService serviceInstance;

    @Override
    public Object getInstance(Class<?> clazz) {
        return ScheduleServiceLocator.getServiceInstance();
    }

    private static ScheduleService getServiceInstance() {
        if (serviceInstance == null) {
            serviceInstance = new ScheduleService();
        }

        return serviceInstance;
    }
}
